import 'dart:core';

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class CustomFormSelection extends StatelessWidget {
  final bool? enable;
  final String? text;
  final String? hintText;
  final GestureTapCallback? onTap;

  const CustomFormSelection(
      {super.key, this.enable, this.text, this.hintText, this.onTap});

  @override
  Widget build(BuildContext context) {
    return TextFormField(
      enabled: enable,
      controller: TextEditingController(text: text),
      readOnly: true,
      onTap: onTap,
      style: TextStyle(fontSize: 32.sp),
      decoration: InputDecoration(
        suffixIcon: Visibility(
          visible: enable ?? true,
          child: Container(
            padding: EdgeInsets.only(right: 32.w),
            child: Image(
              width: 48.w,
              height: 48.h,
              fit: BoxFit.contain,
              image:
                  const AssetImage("assets/images/icon_segue_arrow_grey.png"),
            ),
          ),
        ),
        border: InputBorder.none,
        hintText: hintText,
        hintStyle: const TextStyle(
          color: Color(0xFF999999),
        ),
      ),
    );
  }
}
